package com.springboot.cloud.sysadmin.organization.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.cloud.sysadmin.organization.entity.po.Position;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@Repository
@Mapper
public interface PositionMapper extends BaseMapper<Position> {

    @Select("select p.id from position p,user_position_relation up where  p.id=up.position_id and up.user_id=#{user_id}")
      String getPositions(@Param("user_id") String user_id);
}
